package com.cl.entity;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * 留言
 * 数据库通用操作实体类（普通增删改查）
 */
@TableName("liuyan")
public class LiuyanEntity<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    public LiuyanEntity() {
    }
    
    public LiuyanEntity(T t) {
        try {
            BeanUtils.copyProperties(this, t);
        } catch (IllegalAccessException | InvocationTargetException e) {
            e.printStackTrace();
        }
    }
    
    /**
     * 主键id
     */
    @TableId
    private Long id;
    
    /**
     * 留言人
     */
    private String liuyanren;
    
    /**
     * 接收人
     */
    private String jieshouren;
    
    /**
     * 留言内容
     */
    private String content;
    
    /**
     * 留言时间
     */
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    private Date liuyanshijian;
    
    /**
     * 回复内容
     */
    private String huifu;
    
    /**
     * 回复时间
     */
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    private Date huifushijian;
    
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    private Date addtime;

    public Date getAddtime() {
        return addtime;
    }
    public void setAddtime(Date addtime) {
        this.addtime = addtime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    
    public String getLiuyanren() {
        return liuyanren;
    }
    
    public void setLiuyanren(String liuyanren) {
        this.liuyanren = liuyanren;
    }
    
    public String getJieshouren() {
        return jieshouren;
    }
    
    public void setJieshouren(String jieshouren) {
        this.jieshouren = jieshouren;
    }
    
    public String getContent() {
        return content;
    }
    
    public void setContent(String content) {
        this.content = content;
    }
    
    public Date getLiuyanshijian() {
        return liuyanshijian;
    }
    
    public void setLiuyanshijian(Date liuyanshijian) {
        this.liuyanshijian = liuyanshijian;
    }
    
    public String getHuifu() {
        return huifu;
    }
    
    public void setHuifu(String huifu) {
        this.huifu = huifu;
    }
    
    public Date getHuifushijian() {
        return huifushijian;
    }
    
    public void setHuifushijian(Date huifushijian) {
        this.huifushijian = huifushijian;
    }
} 